var order = ['red', 'yellow', 'blue', 'green', 'red']
Page({
    onReady() {
        //this.data.scrolLeft = 0;
        var _this = this;
/*        setInterval(function () {
            if(_this.data.scrolLeft > 0) {
                _this.setData({scrolLeft: 0});
            } else {
                _this.setData({scrolLeft: 400});
            }
            console.log('切换');
        }, 2000);*/


    },
    onLoad() {
        console.log(this.route);
    },
    data: {
        toView: 'red',
        scrolLeft: 0,
        viewArray:[
            {
                message: 'sad',
            },
            {
                message: 'dfg',
            }
        ],
        redColor: 'red',
        blueColor: 'blue'
    },
    onScrolltoupper: function (e) {
        console.log(e);
    },
    onScrolltolower: function (e) {
        console.log(e);
    },
    onShareAppMessage: function () {
        return {
            title: '自定义转发标题',
            path: '/pages/example/button/button'
        }
    }
})